home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "DistortTwist"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
-
- ' The center about which to twist.
- Public cx As Single
- Public cz As Single
- Public period As Single
- Public offset As Single
-
- ' ************************************************
- ' Apply a shape distorting transformation to
- ' the point.
- ' ************************************************
- Sub Distort(x As Single, y As Single, z As Single)
- Dim theta As Single
-
- theta = (offset - y) * 3.14 / period
-
- x = x * Cos(theta) - z * Sin(theta)
- z = x * Sin(theta) + z * Cos(theta)
- End Sub
-